<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

<ui:composition template="../../template/template.xhtml">
	<ui:define name="content">
		<div class="FORM_HEADER">Specializations</div>
		<h:form id="form1">
			<h:panelGrid columns="3" styleClass="APPLICATION_CONTENT">
				<h:outputLabel value="Subject Name: " for="subjectName" />
				<h:inputText id="subjectName"
					value="#{tutorController.specializationDTO.subjectName}" size="60" />
				<h:message for="subjectName" errorClass="ERROR_MESSAGE" />	

				<h:outputLabel value="Topic Name: " for="topicName" />
				<h:inputText id="topicName"
					value="#{tutorController.specializationDTO.topicName}" size="60" />
				<h:message for="topicName" errorClass="ERROR_MESSAGE" />

				<h:outputLabel value="More Desc.: " for="moreDescription" />
				<h:inputText id="moreDescription"
					value="#{tutorController.specializationDTO.moreDescription}"
					size="60" />
				<h:message for="moreDescription" errorClass="ERROR_MESSAGE" />

				<h:outputLabel value="Which Standard: " for="whichStatndard" />
				<h:inputText id="whichStandard"
					value="#{tutorController.specializationDTO.whichStandard}"
					size="60" />
				<h:message for="whichStandard" errorClass="ERROR_MESSAGE" />

				<h:outputLabel value="Self Rating: " for="selfRating" />
				<h:inputText id="selfRating" cols="50" rows="5"
					value="#{tutorController.specializationDTO.selfRating}" />
				<h:message for="selfRating" errorClass="ERROR_MESSAGE" />

				<h:outputText value="" />
				<p:commandButton value="Save"
					action="#{tutorController.updateSpecialization}" ajax="true"
					update="@form">
				</p:commandButton>
			</h:panelGrid>
			<h:dataTable id="specializationTable"
				value="#{tutorController.specializationDTOList}"
				var="specialization" styleClass="TABLE_BASIC_COMPOSITION"
				headerClass="TABLE_HEADER" rowClasses="ODD_ROW, EVEN_ROW"
				cellpadding="8" width="100%">
				<h:column>
					<f:facet name="header">Subject Name</f:facet>
					<h:outputText value="#{specialization.subjectName}" />
				</h:column>
				<h:column>
					<f:facet name="header">Topic Name</f:facet>
					<h:outputText value="#{specialization.topicName}" />
				</h:column>
				<h:column>
					<f:facet name="header">Description</f:facet>
					<h:outputText value="#{specialization.moreDescription}" />
				</h:column>
				<h:column>
					<f:facet name="header">Standard</f:facet>
					<h:outputText value="#{specialization.whichStandard}" />
				</h:column>
				<h:column>
					<f:facet name="header">Self Rating</f:facet>
					<h:outputText value="#{specialization.selfRating}" />
				</h:column>
				<h:column>
					<f:facet name="header">Student Rating</f:facet>
					<h:outputText value="#{specialization.studentRating}" />
				</h:column>
			</h:dataTable>

		</h:form>
	</ui:define>
</ui:composition>
</html>